// 结构体
struct Out{
  @builtin(position) position:vec4<f32>,
  @location(0) vPosition:vec3<f32>
}

// 入口main函数
@vertex
fn main(@location(0) pos:vec3<f32>) -> Out{
    var out:Out;
    out.position = vec4<f32>(pos, 1.0);
    out.vPosition = pos;
    return out;
}

fn test() -> vec4<f32>{
    // 平移矩阵
    var matT = mat4x4<f32>(
        1.0,0.0,0.0,1.0, 
        0.0,1.0,0.0,0.0, 
        0.0,0.0,1.0,0.0, 
        0.0,0.0,0.0,1.0
    );
    var vec4Pos = vec4<f32>(1.0,0.0,0.0,1.0);
     return matT * vec4Pos;
}